#ifndef DESIGNPATTERN_SUBJECT_H
#define DESIGNPATTERN_SUBJECT_H

#include "Observer.h"
#include <list>

namespace Observer{
    class Obs;
    class Subject{
    public:
        void attach(Obs* observer);
        void detach(Obs* observer);
        void notify();
        virtual int getState()=0;
        virtual void setState(int state)=0;
        Subject();

    private:
        std::list<Obs*> observers;
    };
}

#endif
